package test3.A1_3;

/**
 * 主程序入口
 */
public class Main {
    public static void main(String[] args) {
        // 创建学院
        School school = new School("Example School");

        // 创建系和指导教师
        Department mathDept = new Department("Mathematics");
        Instructor profSmith = new Instructor("Prof. Smith");
        Subject calculus = new Subject("Calculus");

        // 将指导教师添加到系中，并分配课程
        mathDept.addInstructor(profSmith);
        profSmith.assignCourse(calculus);

        // 创建学生并注册课程
        Student alice = new Student("Alice");
        alice.enrollCourse(calculus);

        // 将系添加到学院
        school.addDepartment(mathDept);

        // 输出验证信息
        System.out.println("School: " + school.getDepartments().size() + " departments");
        System.out.println("Department: " + mathDept.getInstructors().size() + " instructors");
        System.out.println("Instructor: " + profSmith.getCourses().size() + " courses");
        System.out.println("Student: " + alice.getCourses().size() + " courses");
    }
}